from random import random

# returns an integer close to x, with expected value x
def round(x):
	if(random()>x-int(x)):
		return int(x)
	else:
		return int(x)+1

def hunt_choices(round_number, current_food, current_reputation, m,  player_reputations):
	#
	P=len(player_reputations)
	#
	# individual decisions don't matter, only the number of hunts:
	# food_change = other_hunts - 2*other_slacks - hunts
	# if everyone hunts on average m/P times, there will be a total of m hunts
	hunts = round(float(m)/P)
	hunt_decisions = ['s',]*P
	#
	# keep the hunters alive
	for h in sorted(range(P),key=lambda v:-player_reputations[v])[:hunts]:
		hunt_decisions[h]='h'
	#
	return hunt_decisions

def hunt_outcomes(food_earnings):
	pass

def round_end(award, m, number_hunters):
	pass
